package com.hikari;

import java.awt.*;
import java.util.ArrayList;

/*2-1为窗口添加背景图片*/
public class GameUtils {
    //9-2方向
    static boolean UP = false;
    static boolean DOWN = false;
    static boolean LEFT = false;
    static boolean RIGHT = false;
    //11 游戏积分的实现
    //分数
    static int count = 0;
    //12-1 关卡等级
    static int level=0;


    //8-1 创建一个敌方鱼的集合
    public static ArrayList<Enemy> enemyList = new ArrayList<>();
    //2-2 在工具类中定义一个静态的背景图片
    public static Image bgImg = Toolkit.getDefaultToolkit().createImage("images/sea.jpg");
    //敌方鱼类
    public static Image enemy_fish1_r = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish1_r.gif");
    public static Image enemy_fish1_l = Toolkit.getDefaultToolkit().createImage("images/enemyFish/fish1_l.gif");

    //我方鱼类
    public static Image myFish_r = Toolkit.getDefaultToolkit().createImage("images/myFish/myfish_right.gif");
    public static Image myFish_l = Toolkit.getDefaultToolkit().createImage("images/myFish/myfish_left.gif");

    public static void draw(Graphics g,String str1,Color color,int width,int height,int size){
//        g.drawImage(GameUtils.bgImg, 0, 0, null);
        //3-5 将画笔颜色改为红色
        g.setColor(color);
        //3-6 设置字体样式
        g.setFont(new Font("仿宋", Font.BOLD, size));
        //3-7 为启动页面添加文字
        g.drawString(str1, width, height);

    }
}
